package com.ymttest.database.mapping.withdraw;

import com.ymttest.database.model.withdraw.Ymt_WithDrawCounter;
import com.ymttest.database.model.withdraw.Ymt_WithDrawCounterExample;
import com.ymttest.database.model.withdraw.Ymt_WithDrawCounterKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface Ymt_WithDrawCounterMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_WithDrawCounter
     *
     * @mbggenerated Fri Oct 11 11:27:57 CST 2019
     */
    @SelectProvider(type=Ymt_WithDrawCounterSqlProvider.class, method="countByExample")
    int countByExample(Ymt_WithDrawCounterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_WithDrawCounter
     *
     * @mbggenerated Fri Oct 11 11:27:57 CST 2019
     */
    @DeleteProvider(type=Ymt_WithDrawCounterSqlProvider.class, method="deleteByExample")
    int deleteByExample(Ymt_WithDrawCounterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_WithDrawCounter
     *
     * @mbggenerated Fri Oct 11 11:27:57 CST 2019
     */
    @Delete({
        "delete from Ymt_WithDrawCounter",
        "where CounterName = #{counterName,jdbcType=VARCHAR}",
          "and TargetId = #{targetId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(Ymt_WithDrawCounterKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_WithDrawCounter
     *
     * @mbggenerated Fri Oct 11 11:27:57 CST 2019
     */
    @Insert({
        "insert into Ymt_WithDrawCounter (CounterName, TargetId, ",
        "Times, CycleTime, ",
        "CreateTime, LastUpdateTime)",
        "values (#{counterName,jdbcType=VARCHAR}, #{targetId,jdbcType=VARCHAR}, ",
        "#{times,jdbcType=INTEGER}, #{cycleTime,jdbcType=TIMESTAMP}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{lastUpdateTime,jdbcType=TIMESTAMP})"
    })
    int insert(Ymt_WithDrawCounter record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_WithDrawCounter
     *
     * @mbggenerated Fri Oct 11 11:27:57 CST 2019
     */
    @InsertProvider(type=Ymt_WithDrawCounterSqlProvider.class, method="insertSelective")
    int insertSelective(Ymt_WithDrawCounter record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_WithDrawCounter
     *
     * @mbggenerated Fri Oct 11 11:27:57 CST 2019
     */
    @SelectProvider(type=Ymt_WithDrawCounterSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="CounterName", property="counterName", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="TargetId", property="targetId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="Times", property="times", jdbcType=JdbcType.INTEGER),
        @Result(column="CycleTime", property="cycleTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="LastUpdateTime", property="lastUpdateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<Ymt_WithDrawCounter> selectByExample(Ymt_WithDrawCounterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_WithDrawCounter
     *
     * @mbggenerated Fri Oct 11 11:27:57 CST 2019
     */
    @Select({
        "select",
        "CounterName, TargetId, Times, CycleTime, CreateTime, LastUpdateTime",
        "from Ymt_WithDrawCounter",
        "where CounterName = #{counterName,jdbcType=VARCHAR}",
          "and TargetId = #{targetId,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="CounterName", property="counterName", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="TargetId", property="targetId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="Times", property="times", jdbcType=JdbcType.INTEGER),
        @Result(column="CycleTime", property="cycleTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="LastUpdateTime", property="lastUpdateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    Ymt_WithDrawCounter selectByPrimaryKey(Ymt_WithDrawCounterKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_WithDrawCounter
     *
     * @mbggenerated Fri Oct 11 11:27:57 CST 2019
     */
    @UpdateProvider(type=Ymt_WithDrawCounterSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Ymt_WithDrawCounter record, @Param("example") Ymt_WithDrawCounterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_WithDrawCounter
     *
     * @mbggenerated Fri Oct 11 11:27:57 CST 2019
     */
    @UpdateProvider(type=Ymt_WithDrawCounterSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Ymt_WithDrawCounter record, @Param("example") Ymt_WithDrawCounterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_WithDrawCounter
     *
     * @mbggenerated Fri Oct 11 11:27:57 CST 2019
     */
    @UpdateProvider(type=Ymt_WithDrawCounterSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Ymt_WithDrawCounter record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_WithDrawCounter
     *
     * @mbggenerated Fri Oct 11 11:27:57 CST 2019
     */
    @Update({
        "update Ymt_WithDrawCounter",
        "set Times = #{times,jdbcType=INTEGER},",
          "CycleTime = #{cycleTime,jdbcType=TIMESTAMP},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "LastUpdateTime = #{lastUpdateTime,jdbcType=TIMESTAMP}",
        "where CounterName = #{counterName,jdbcType=VARCHAR}",
          "and TargetId = #{targetId,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(Ymt_WithDrawCounter record);
}